package com.lagou.sqlSession;

import java.util.List;

/**
 * @author DingYiYuan
 * @description
 * @time 2021/3/10 16:00
 */
public interface SqlSession {

    //查询所有
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    //根据条件查询单个
    <T> T selectOne(String statementId, Object... params) throws Exception;

    //保存单个对象
    <E> List<E> insertOne(String statementId, Object... params) throws Exception;

    //更新单个对象
    <E> List<E> updateOne(String statementId, Object... params) throws Exception;

    //删除单个
    <E> List<E> deleteOne(String statementId, Object... params) throws Exception;

    //为Dao接口生成代理实现类
    <T> T getMapper(Class<?> mapperClass);


}
